package cn.school.demo.ui.article

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import cn.school.demo.MyApplication
import cn.school.demo.pojo.Hobby
import cn.school.demo.repository.SetLoveRepository
import com.blankj.utilcode.util.LogUtils

class ArticleViewModel : ViewModel() {
    private var _tabs: LiveData<MutableList<Hobby>>
    val tabs: LiveData<MutableList<Hobby>>
        get() = _tabs

    init {
        _tabs = getTabTitles()
    }


    private fun getTabTitles(): LiveData<MutableList<Hobby>> {
        return SetLoveRepository().getUserLove(MyApplication.user!!.sfNumber)
    }
}